package com.soft.javase.day02.consolidation.hasanduse;

/**
 * @author yzg
 * @desc TODO
 * @date 2025/4/16
 */
public class People {
    private String name;
    private int age;
    private Phone phone;

    public void work(Car car){
        System.out.println(name+"开着"+car.getBrand()+"去上班");
    }

    public void call(){
        System.out.println(name+"正在使用"+phone.getBrand()+"手机打电话");
    }

    public People() {
    }

    public People(String name, int age, Phone phone) {
        this.name = name;
        this.age = age;
        this.phone = phone;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Phone getPhone() {
        return phone;
    }

    public void setPhone(Phone phone) {
        this.phone = phone;
    }

}
